package io.terminus.spzx.manager.service.impl;

import io.terminus.spzx.manager.properties.MinioProperties;
import io.terminus.spzx.manager.service.FileUploadService;
import io.terminus.spzx.manager.utils.FileUploadUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author lichunlong lcl253137@alibaba-inc.com
 * @Desc 文件上传Service实现类
 * @Date 2024-05-26
 */
@Service
public class FileUploadServiceImpl implements FileUploadService {

    @Autowired
    private MinioProperties minioProperties;

    @Override
    public String fileUpload(MultipartFile uploadFile) {
        return FileUploadUtil.uploadFile(uploadFile, minioProperties);
    }
}
